[GdkScreenX11] Fix check in gdk_screen_get_primary_monitor
authorAdel Gadllah <adel.gadllah@gmail.com>
Tue, 6 Apr 2010 00:41:55 +0000 (02:41 +0200)
committerAdel Gadllah <adel.gadllah@gmail.com>
Tue, 6 Apr 2010 00:41:55 +0000 (02:41 +0200)
Fix bug in last commit.

gdk/x11/gdkscreen-x11.c

index 76ab17f0e9f6c9667c1a1ef813adc4067d2e7f68..f27d4ecf24cbd4beb3897d1d513d9759fd0b1088 100644 (file)
@@ -771,7 +771,7 @@ init_randr13 (GdkScreen *screen)
       XRROutputInfo *output =
        XRRGetOutputInfo (dpy, resources, resources->outputs[i]);
 
-      if (primary_output != None && resources->outputs[i] == primary_output)
+      if (resources->outputs[i] == primary_output)
         {
           screen_x11->primary_monitor = i;
         }
@@ -786,7 +786,7 @@ init_randr13 (GdkScreen *screen)
         }
 
       /* No RandR1.3+ available or no primary set, fall back to prefer LVDS as primary if present */
-      if (g_ascii_strncasecmp (output->name, "LVDS", 4) == 0)
+      if (primary_output == None && g_ascii_strncasecmp (output->name, "LVDS", 4) == 0)
         {
           screen_x11->primary_monitor = i;
         }